
#include "User.h"
#include "DataBaseMgr.h"
namespace cupid
{

User::User(void)
{
	m_guid = 0;
	m_sock = 0;
	m_signin = false;
}

User::~User(void)
{
}
void User::onSignup()
{
	sDataBase << format_str("INSERT INTO user VALUES('%d', '%s', '%s');", m_guid, m_name.c_str(), m_password.c_str());
}
void User::onLoad(vector<string>& row)
{
	setGuid(str2int(row[0]));
	setName(row[1]);
	setPassword(row[2]);
}
}